<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "https://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="Content-Language" content="zh-CN"><link href="stylesheet.css" media="all" rel="stylesheet" type="text/css">
<title>pg_description</title>
<script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?d286c55b63a3c54a1e43d10d4c203e75"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script>
</head><body class="SECT1">
<div>
<table summary="Header navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><th colspan="5" align="center" valign="bottom">PostgreSQL 8.2.3 中文文档</th></tr>
<tr><td width="10%" align="left" valign="top"><a href="catalog-pg-depend.html" accesskey="P">后退</a></td><td width="10%" align="left" valign="top"><a href="catalogs.html">快退</a></td><td width="60%" align="center" valign="bottom">章43. 系统表</td><td width="10%" align="right" valign="top"><a href="catalogs.html">快进</a></td><td width="10%" align="right" valign="top"><a href="catalog-pg-index.html" accesskey="N">前进</a></td></tr>
</table>
<hr align="LEFT" width="100%"></div>
<div class="SECT1"><h1 class="SECT1"><a name="CATALOG-PG-DESCRIPTION">43.17. <tt class="STRUCTNAME">pg_description</tt></a></h1><a name="AEN63527"></a>
<p><tt class="STRUCTNAME">pg_description</tt> 表可以给每个数据库对象存储一个可选的描述(注释)。你可以用 <a href="sql-comment.html"><i>COMMENT</i></a> 命令操作这些描述，并且可以用 <span class="APPLICATION">psql</span> 的 <tt class="LITERAL">\d</tt> 命令查看。许多内置的系统对象的描述提供了 <tt class="STRUCTNAME">pg_description</tt> 的初始内容。</p>
<p><a href="catalog-pg-shdescription.html"><tt class="STRUCTNAME">pg_shdescription</tt></a> 提供了类似的功能，它记录了整个集群范围内共享对象的注释。</p>
<div class="TABLE"><a name="AEN63538"></a>
<p><b>表43-17. <tt class="STRUCTNAME">pg_description</tt> 字段</b></p>
<table border="1" class="CALSTABLE"><col><col><col><col>
<thead>
<tr><th>名字</th><th>类型</th><th>引用</th><th>描述</th></tr>
</thead>
<tbody>
<tr><td><tt class="STRUCTFIELD">objoid</tt></td><td><tt class="TYPE">oid</tt></td><td>任意 oid 属性</td><td>这条描述所描述的对象的 OID</td></tr>
<tr><td><tt class="STRUCTFIELD">classoid</tt></td><td><tt class="TYPE">oid</tt></td><td><tt class="LITERAL"><a href="catalog-pg-class.html"><tt class="STRUCTNAME">pg_class</tt></a>.oid</tt></td><td>这个对象出现的系统表的 OID</td></tr>
<tr><td><tt class="STRUCTFIELD">objsubid</tt></td><td><tt class="TYPE">int4</tt></td><td>&nbsp;</td><td>对于一个表字段的注释，它是字段号(<tt class="STRUCTFIELD">objoid</tt> 和 <tt class="STRUCTFIELD">classoid</tt> 指向表自身)。对于其它对象类型，它是零。</td></tr>
<tr><td><tt class="STRUCTFIELD">description</tt></td><td><tt class="TYPE">text</tt></td><td>&nbsp;</td><td>作为对该对象的描述的任意文本</td></tr>
</tbody>
</table>
</div>
</div>
<div>
<hr align="LEFT" width="100%">
<table summary="Footer navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td width="33%" align="left" valign="top"><a href="catalog-pg-depend.html" accesskey="P">后退</a></td><td width="34%" align="center" valign="top"><a href="index.html" accesskey="H">首页</a></td><td width="33%" align="right" valign="top"><a href="catalog-pg-index.html" accesskey="N">前进</a></td></tr>
<tr><td width="33%" align="left" valign="top"><tt class="STRUCTNAME">pg_depend</tt></td><td width="34%" align="center" valign="top"><a href="catalogs.html" accesskey="U">上一级</a></td><td width="33%" align="right" valign="top"><tt class="STRUCTNAME">pg_index</tt></td></tr>
</table>
</div>
</body></html>